#include <string.h>
#include <stdio.h>

int prefixCount(char ** words, int wordsSize, char * pref) {
    int res = 0;
    int len = strlen(pref);
    for (int i = 0; i < wordsSize; ++i) {
        if (strncmp(words[i], pref, len) == 0) {
            res++;
        }
    }
    return res;
}

int main()
{
    char *words[4] = {"pay","attention","practice","attend"}, *pref = "at";
    int ret = prefixCount(words, 4, pref);
    printf("%d", ret);

}